home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / ftn / polysm.z / polysm
Encoding:
Text File  |  2002-10-03  |  6.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ppppoooollllyyyyssssmmmm((((3333GGGG))))                                                          ppppoooollllyyyyssssmmmm((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ppppoooollllyyyyssssmmmm - specify antialiasing of polygons
  10.  
  11. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  12.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ppppoooollllyyyyssssmmmm((((mmmmooooddddeeee))))
  13.      iiiinnnntttteeeeggggeeeerrrr****4444 mmmmooooddddeeee
  14.  
  15. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  16.      _m_o_d_e   Expects one of the symbolic constants:
  17.  
  18.             PPPPYYYYSSSSMMMMOOOOFFFF:  do not antialias polygons.  (default)
  19.  
  20.             PPPPYYYYSSSSMMMMOOOONNNN:  compute coverage values for all perimeter polygon pixels
  21.             in such a way as to not change the size of the polygon.
  22.  
  23.             PPPPYYYYSSSSMMMMSSSSHHHH:  Compute coverage values for all perimeter polygon pixels
  24.             in such a way as to shrink the polygon slightly.
  25.  
  26. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  27.      ppppoooollllyyyyssssmmmm specifies one-pass antialiasing of polygons.  Unlike ppppnnnnttttssssmmmmoooo and
  28.      lllliiiinnnneeeessssmmmm, it is available only in RGB mode.  Also, unlike ppppnnnnttttssssmmmmoooo and
  29.      lllliiiinnnneeeessssmmmm, its use in complex scenes requires attention to primitive drawing
  30.      order if acceptable results are to be achieved.  Thus ppppoooollllyyyyssssmmmm use is
  31.      somewhat more complex than that of ppppnnnnttttssssmmmmoooo and lllliiiinnnneeeessssmmmm.
  32.  
  33.      Like points and lines, polygons are antialiased by computing a coverage
  34.      value for each scan-converted pixel, and using this coverage value to
  35.      scale pixel alpha.  Thus, for RGB antialiased polygons to draw correctly,
  36.      bbbblllleeeennnnddddffff must be set to merge new pixel color components with the previous
  37.      components using the incoming alpha.  In the simplistic case of adding a
  38.      single, antialiased polygon to a previously rendered scene, the same
  39.      bbbblllleeeennnnddddffff as is typically used for point and line antialiasing can be used:
  40.  
  41.           bbbblllleeeennnnddddffff((((BBBBFFFFSSSSAAAA,,,, BBBBFFFFMMMMSSSSAAAA)))).
  42.  
  43.      Pixels in the interior of the polygon will have coverage assigned to 1.0,
  44.      and will therefore replace their framebuffer counterparts.  Pixels on the
  45.      perimeter of the polygon are blended into the framebuffer in proportion
  46.      to their computed coverage.
  47.  
  48.      A more typical case, however, is that of antialiasing the polygons that
  49.      comprise the surface of a solid object.  Here the standard bbbblllleeeennnnddddffff will
  50.      result in 'leakage' of color between adjacent polygons.  For example, if
  51.      the first polygon drawn covers a sample pixel 40%, and the second
  52.      (adjacent) polygon covers the pixel 60%, the net coverage of %100 still
  53.      leaves %24 background color in the pixel.
  54.  
  55.      If the solid object is to be correctly antialiased, with no leakage
  56.      through interior edges, and with proper silhouettes, the following rules
  57.      must be followed:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ppppoooollllyyyyssssmmmm((((3333GGGG))))                                                          ppppoooollllyyyyssssmmmm((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      1.   Polygons must be drawn in view order from nearest to farthest.  (Not
  75.           farthest to nearest as is done with transparency.)
  76.  
  77.      2.   Polygons that face away from the viewer must not be drawn.  (Use
  78.           backfa(.TRUE.).)
  79.  
  80.      3.   The special blendf(BFMINS, BFONE) must be used to blend polygons
  81.           into the framebuffer.
  82.  
  83.      4.   Polysmooth mode PPPPYYYYSSSSMMMMOOOONNNN must be used.
  84.  
  85.      The special polysmooth mode PPPPYYYYSSSSMMMMSSSSHHHH specifies a coverage algorithm that
  86.      includes only pixels that would have been scan-converted had the mode
  87.      been PPPPYYYYSSSSMMMMOOOOFFFF.  (PPPPYYYYSSSSMMMMOOOONNNN includes pixels that are outside that range of
  88.      those point-sampled by the PPPPYYYYSSSSMMMMOOOOFFFF algorithm.)  PPPPYYYYSSSSMMMMSSSSHHHH necessarily leaks
  89.      background color between adjacent polygons, but does this in a way that
  90.      resembles antialiased lines.  Thus, PPPPYYYYSSSSMMMMSSSSHHHH can be used in conjunction
  91.      with blendf(BFSA, BFZERO),,,, aaaannnndddd wwwwiiiitttthhhh nnnnoooo ssssoooorrrrttttiiiinnnngggg ooooffff ppppoooollllyyyyggggoooonnnnssss ((((uuuusssseeee tttthhhheeee zzzz----
  92.      bbbbuuuuffffffffeeeerrrr)))),,,, ttttoooo ggggeeeennnneeeerrrraaaatttteeee ssssoooolllliiiidddd iiiimmmmaaaaggggeeeessss tttteeeesssssssseeeellllaaaatttteeeedddd wwwwiiiitttthhhh bbbbllllaaaacccckkkk,,,, aaaannnnttttiiiiaaaalllliiiiaaaasssseeeedddd
  93.      lllliiiinnnneeeessss....
  94.  
  95. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  96.      linesm, pntsmo, blendf, subpix
  97.  
  98. NNNNOOOOTTTTEEEESSSS
  99.      IRIS-4D G, GT, and GTX models, as well as the Personal Iris, Iris Entry,
  100.      Indy, XL, XS, XS24, XZ, Elan, and Extreme systems do not support ppppoooollllyyyyssssmmmm.
  101.      Use ggggeeeettttggggddddeeee to determine whether ppppoooollllyyyyssssmmmm is supported.
  102.  
  103.      ssssuuuubbbbppppiiiixxxx mode should always be enabled while ppppoooollllyyyyssssmmmm is used.
  104.  
  105.      On the IRIS-4D RealityEngine pixels that are outside of the perimeter of
  106.      the polygon may be drawn.  However, their coverage values will be 0.0.
  107.  
  108. BBBBUUUUGGGGSSSS
  109.      IRIS-4D VGX models reveal their decomposition of 4+ sided polygons into
  110.      triangles when PPPPYYYYSSSSMMMMSSSSHHHH is selected.  This behavior is not intended, and
  111.      may not be duplicated by future VGX software releases, or by future
  112.      models.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.